home *** CD-ROM | disk | FTP | other *** search
/ USA Bestseller / USA BESTSELLER Vol 1-95 (Hepp-Computer)(1995).iso / e004 / update.doc < prev    next >
Text File  |  1994-10-14  |  7KB  |  138 lines

  1. l---+---L1---P-----2----+----3--T-+----4T---+----5----+----6---------7-R--+--r
  2.                               LAPTOP UPDATE
  3.  
  4.         PURPOSE : To update groups of files between 2 computers. Usually 
  5.                   a laptop and a desktop. This can be done with a link 
  6.                   using DOS 6 or by updating a floppy between the 2 
  7.                   computers. 
  8.  
  9.                            How the system works
  10.  
  11.         The system has 3 main parts that all work together.
  12.         1.   LAPTOP.BTM is the main batch file. First I call a batch 
  13.              file called MARK_DEL.BAT. This deletes files from the 
  14.              laptop if desired and/or turns off the archive bit for 
  15.              files that only need to be on laptop.
  16.         2.   UPDATE.LST is a data file read and processed by UPDATE.BTM. 
  17.         3.   UPDATE.BTM does the actual copying of files between the two 
  18.              computers. 
  19.  
  20.         For the purposes of this discussion, the laptop is always the 
  21.         source and the desktop is always the destination. In my system I 
  22.         use my desktop computer as a backup system for my laptop. Files 
  23.         are copied to a directory structure on my desktop computer and 
  24.         then these are backed up in turn with my other files to my tape 
  25.         backup.
  26.  
  27.                                 MARK_DEL.BTM
  28.  
  29.              This is an optional file. On my computer I use a file 
  30.         called MARK.DOC to copy things between files. This file may be 
  31.         in several different directories but never contains anything 
  32.         that needs to be saved. I erase all copies before the update. 
  33.         Then I turn off the archive bit on all other files that don't 
  34.         need to be transferred. Included in this zip file is a sample of 
  35.         my batch file. 
  36.                                 UPDATE.LST
  37.  
  38.              This is a data file that is read and processed by 
  39.         UPDATE.BTM. It takes the following form.
  40.  
  41.                           SourceDir    DestDir     FileMask       Option
  42.  
  43.         Example line ==>  c:\qpro      f:\qpro      *.wq1          EX
  44.  
  45.              I will discuss the option first. There are 4 possible 
  46.         options. 
  47.  
  48.              EX is exchange. This will cause all archive files to be 
  49.         copied from the source directory to the destination directory 
  50.         that have the mask *.wq1. The files on the source must also be 
  51.         newer than the matching file on the destination or must not 
  52.         exist at all. This insures that the newest version of the file 
  53.         is on both computers and that a newer file is not over written. 
  54.         This is the option that you will use the most. The archive bits 
  55.         will be turned off in the source directory only. Archive bit is 
  56.         not needed on the destination to cause a copy and will not be 
  57.         altered in the process. This is to prevent interfering with any 
  58.         backup system on the main computer. Also, if the destination 
  59.         directory does not exist, you will be prompted to create it. 
  60.  
  61.                 Source => Archive & Newer => Dest
  62.                 Dest   => Newer           => Source                 
  63.  
  64.  
  65.              UP is Update. This will do an EXchange but the files must 
  66.         exist on each drive to be copied. In other words, this option 
  67.         will not create any NEW files on either computer.
  68.  
  69.  
  70.              BU is Backup. This will copy all archive files from the 
  71.         source to destination. The archive bit will then be turned off 
  72.         in the source. Remember it is never altered in the destination. 
  73.         No files will be copied back to source with this option. It is 
  74.         exactly what it seems, a method of backing up files to my 
  75.         desktop computer and then in turn being backed up to my tape 
  76.         drive along with other desktop files.
  77.  
  78.  
  79.              APND is Append. This option I use very little but it comes 
  80.         in handy. I'll see if I can explain it so it is understandable. 
  81.         I'll start out with a couple of lines from the LST file:
  82.  
  83.                 c:\fd.mtg  d:\dfd.mtg  dummy              APND
  84.                 c:\dfd     d:          dfd.mtg            EX
  85.  
  86.              The first two parameters are not directories for this 
  87.         option. They are complete path and filenames. In the above 
  88.         example C:\FD.MTG is a temporary file. The lines from this file 
  89.         are appended to the end of the permanent file D:\DFD.MTG. The 
  90.         3rd parameter "dummy" is exactly that. This option only requires 
  91.         3 parameters. The "dummy" parameter is required only to keep the 
  92.         "APND" as the 4th (option) parameter. The two lines above would 
  93.         perform the following actions: 
  94.  
  95.              1. Append C:\FD.MTG to the end of D:\DFD.MTG. 
  96.              2. Delete C:\FD.MTG as this is a temporary file.
  97.              3. Line 2 is a regular EXchange line. This would exchange 
  98.                 the file DFD.MTG from C:\DFD directory to the root 
  99.                 directory of drive D, then back to C:\DFD so both 
  100.                 computers have the updated permanent file.
  101.  
  102.              This also points out that none of the directories should 
  103.         end in a backslash. Just put the drive letter and colon for the 
  104.         root directory.
  105.                                 UPDATE.BTM
  106.  
  107.              UPDATE.BTM takes one parameter. That is the filename of the 
  108.         LST data file. The LST extension is not necessary. Any filename 
  109.         is appropriate. The format must be correct or unpredictable 
  110.         results will occur.
  111.  
  112.                                 LAPTOP.BTM
  113.  
  114.              This is the main batch file that calls the mark_del batch 
  115.         file and then calls the update batch file. Mine does a couple 
  116.         of other things that I will explain also.
  117.              After the two calls, I write out a list of all the files on 
  118.         the laptop that are still archive files. This tells me what 
  119.         files are not being backed up. Then I can either add them to 
  120.         mark_del to mark and or delete or decide on a directory to back 
  121.         these files up to. 
  122.  
  123.                                 YESNO.BTM
  124.  
  125.              The last file in this zip really is not needed for the 
  126.         update system. It has the following syntax: 
  127.  
  128.                         YESNO Y|N TextToDisplay
  129.  
  130.              The Y|N is the default answer that will be displayed 
  131.         blinking in bright yellow. Every 15 seconds or so it will beep 
  132.         to remind you that it is waiting for an answer. If Y or N is not 
  133.         pressed after 3 beeps (about one-half minute) the default is 
  134.         assumed and the batch file continues. It sets an environment 
  135.         variable ANSWER to either "Y" or "N". The calling batch file can 
  136.         take appropriate action based on this. 
  137.  
  138.